
/**********************页面懒加载*******************************/
var totalPages; //总页数
var pageno = 0; //当前页数
var C = 10;     //滚动条距离底部的距离
$(function () {
    $(window).scroll(function () {
        var scrollTop = $(this).scrollTop(),
            scrollHeight = $(document).height(),
            windowHeight = $(this).height();
        var positionValue = (scrollTop + windowHeight) - scrollHeight;
        if (positionValue >= -C){
            if (pageno < totalPages - 1){
                pageno++;
                doSomething(pageno);
            } else {
                alert('没有更多了')
            }
        }
    })
});

function doSomething(pageno) {
    var uel = ''; //分页列表接口
    var data = {
        size:5,
        start:pageno,
    };
    $.getJSON(url,data,function () {
        
    })
}


/***********************模糊搜索******************************/
$(function () {
    var search_input = $('.search_box input'),
        search_content = $('.search_content');
    $(search_input).on('keyup',function () {
        $(search_content).show();
    })
    $(".search_content li:contains("+search_input.val().trim()+")").show();
    $(".search_content li:not("+search_input.val().trim()+")").hide()
})
